package com.cz.basetool.ui_work.manager;


import com.cz.basetool.ui_work.util.sp.SPUtil;
import com.cz.basetool.ui_work.util.sp.SPUtilKeys;

/**
 * Created by 陈章 on 2017/12/17.
 * 防止锁卡管理者
 */
public class LockCardManager {
    private static LockCardManager instance =  new LockCardManager();


    private LockCardManager(){}

    public static LockCardManager getInstance(){
        return instance;
    }

    public void mark(){
        SPUtil.put(SPUtilKeys.WRITE_CARD_LOCKED_FLAG,true);
    }

    public void unMark(){
        SPUtil.put(SPUtilKeys.WRITE_CARD_LOCKED_FLAG,false);
    }

    public boolean isLocked(){
        return (boolean) SPUtil.get(SPUtilKeys.WRITE_CARD_LOCKED_FLAG,false);
    }
}
